<template>
  <div class="tips_panel" :style="{'--progress':`${progress}%`}">
    <i :class="[icon, 'tips_panel_icon']"/>
    <span class="tips_panel_tips">{{ tips }}</span>
  </div>
</template>

<script>
export default {
  props: {
    tips: String,
    icon: String,
    progress: {
      type: Number,
      default: 100
    }
  }
}
</script>

<style scoped>
.tips_panel {
  --progress: 100%;
  --background-color: rgba(0, 0, 0, 0.3);

  gap: 10px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-image: linear-gradient(360deg, var(--background-color) var(--progress), transparent var(--progress));
}

.tips_panel_icon {
  font-size: 32px;
}
</style>